//
//  FocusParser.m
//  EasyBuy
//
//  Created by Zhu Xiangjun on 9/30/12.
//  Copyright (c) 2012 shen donghao. All rights reserved.
//

#import "FocusParser.h"
#import "FocusData.h"

@implementation FocusParser

-(NSArray *)excuteToObjects:(NSDictionary *)itemFeeds{
    NSMutableArray *feedsArray = [[NSMutableArray alloc] init];
    NSArray *feeds = [itemFeeds objectForKey:@"focus_list"];
    int count = [feeds count];
    for(int i = 0 ; i < count ; i++){
        
        NSDictionary *item = [feeds objectAtIndex:i];
        FocusData *focusData = [[FocusData alloc] init];
        focusData.focusid    = [[item objectForKey:@"focusid"] intValue];
        focusData.focustype  = [[item objectForKey:@"focustype"] intValue];
        focusData.focustitle = [item objectForKey:@"focustitle"];
        focusData.focusimage = [item objectForKey:@"focusimage"];
        focusData.focusdesc  = [item objectForKey:@"focusdesc"];
        [feedsArray addObject:focusData];
        [focusData release];
    }

    return feedsArray;
}

@end
